package architect.springcloud.feign.service;

import architect.springcloud.feign.security.BasicAuthConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 短信服务
 *
 * @author guanxin
 * @date 2018/4/18 17:23
 */

@FeignClient(value = "service-provider", configuration = BasicAuthConfiguration.class, fallbackFactory = HystrixSmsServiceFailFactory.class)
public interface SmsService {

    @RequestMapping(value = "/sendSms", method = RequestMethod.POST)
    String sendSms(@RequestParam(value = "content") String content);
}